diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-28 23:48:11 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-28 23:48:11 +0200 |
commit | 7fe0db182cdbb4a2b3a190ff15a237b1b1c7402e (patch) | |
tree | 8a1b2937daf86cf5101206a599cd9e55d752a953 | |
parent | f0dae89d68bc2eda94e141494aa69181824acbfd (diff) | |
parent | 9debc5422a42e743e8a7de6365cec7971c4a1c7d (diff) | |
download | Chimère - projet Saclay-7fe0db182cdbb4a2b3a190ff15a237b1b1c7402e.tar.bz2 Chimère - projet Saclay-7fe0db182cdbb4a2b3a190ff15a237b1b1c7402e.zip |
Merge branch 'saclay' into saclay-v2.2
Conflicts:
templates/chimere/detail.html
-rw-r--r-- | static/saclay/css/saclay.css | 30 | ||||
-rw-r--r-- | static/saclay/css/styles.css | 3 | ||||
-rw-r--r-- | static/saclay/images/subcategories/agri_ventealaferme_off.png | bin | 0 -> 3495 bytes | |||
-rw-r--r-- | static/saclay/images/subcategories/agri_ventealaferme_on.png | bin | 0 -> 3531 bytes | |||
-rw-r--r-- | static/saclay/images/subcategories/ress_heberg_off.png | bin | 0 -> 3419 bytes | |||
-rw-r--r-- | static/saclay/images/subcategories/ress_heberg_on.png | bin | 0 -> 3439 bytes | |||
-rw-r--r-- | static/saclay/json/limites.json | 11 | ||||
-rw-r--r-- | templates/chimere/blocks/map.html | 2 | ||||
-rw-r--r-- | templates/chimere/blocks/map_menu.html | 14 | ||||
-rw-r--r-- | templates/chimere/detail.html | 3 | ||||
-rw-r--r-- | templates/chimere/main_map_simple.html | 120 | ||||
-rw-r--r-- | xslt/guyancourt.xslt | 17 |
12 files changed, 170 insertions, 30 deletions
diff --git a/static/saclay/css/saclay.css b/static/saclay/css/saclay.css index c94d90b..9bf32e4 100644 --- a/static/saclay/css/saclay.css +++ b/static/saclay/css/saclay.css @@ -188,14 +188,6 @@ background-image:url('../images/subcategories/bala_2_on.png'); } -/*17 - Sport et loisirs - Terrains de sport*/ -#li_sub_17 label{ - background-image:url('../images/subcategories/spor_3_off.png'); -} - -#li_sub_17 .selected label{ - background-image:url('../images/subcategories/spor_3_on.png'); -} /*18 - Sport et loisirs - Parcs et jardins*/ #li_sub_18 label{ @@ -215,13 +207,13 @@ background-image:url('../images/subcategories/spor_5_on.png'); } -/*20 - Sport et loisirs - Salles de sport*/ +/*20 - Sport et loisirs - Equipements sportifs */ #li_sub_20 label{ - background-image:url('../images/subcategories/spor_1_off.png'); + background-image:url('../images/subcategories/spor_3_off.png'); } #li_sub_20 .selected label{ - background-image:url('../images/subcategories/spor_1_on.png'); + background-image:url('../images/subcategories/spor_3_on.png'); } /*22 - Balades - Points étapes*/ @@ -262,11 +254,11 @@ /*30 - Agri-cultures - Ventes en circuits courts*/ #li_sub_30 label{ - background-image:url('../images/subcategories/agri_1_off.png'); + background-image:url('../images/subcategories/agri_4_off.png'); } #li_sub_30 .selected label{ - background-image:url('../images/subcategories/agri_1_on.png'); + background-image:url('../images/subcategories/agri_4_on.png'); } /*31 - Agri-cultures - Exploitations agricoles*/ @@ -500,11 +492,11 @@ /*61 - Agri-cultures - Ventes à la ferme*/ #li_sub_61 label{ - background-image:url('../images/subcategories/agri_4_off.png'); + background-image:url('../images/subcategories/agri_ventealaferme_off.png'); } #li_sub_61 .selected label{ - background-image:url('../images/subcategories/agri_4_on.png'); + background-image:url('../images/subcategories/agri_ventealaferme_on.png'); } /*62 - Événements - Expositions*/ @@ -615,4 +607,12 @@ background-image:url('../images/subcategories/patri_forets_on.png'); } +/*81 - Ressources pratiques - Hébergement*/ +#li_sub_81 label{ + background-image:url('../images/subcategories/ress_heberg_off.png'); +} + +#li_sub_81 .selected label{ + background-image:url('../images/subcategories/ress_heberg_on.png'); +} diff --git a/static/saclay/css/styles.css b/static/saclay/css/styles.css index 724228b..6046bb2 100644 --- a/static/saclay/css/styles.css +++ b/static/saclay/css/styles.css @@ -1184,7 +1184,8 @@ ul.share { position:absolute; width:276px; height:22px; - border-right:1px solid; + border-right:1px solid #999; + border-left:1px solid #999; } .sidebar-handler{ diff --git a/static/saclay/images/subcategories/agri_ventealaferme_off.png b/static/saclay/images/subcategories/agri_ventealaferme_off.png Binary files differnew file mode 100644 index 0000000..2aecffb --- /dev/null +++ b/static/saclay/images/subcategories/agri_ventealaferme_off.png diff --git a/static/saclay/images/subcategories/agri_ventealaferme_on.png b/static/saclay/images/subcategories/agri_ventealaferme_on.png Binary files differnew file mode 100644 index 0000000..04944cd --- /dev/null +++ b/static/saclay/images/subcategories/agri_ventealaferme_on.png diff --git a/static/saclay/images/subcategories/ress_heberg_off.png b/static/saclay/images/subcategories/ress_heberg_off.png Binary files differnew file mode 100644 index 0000000..b8e14dc --- /dev/null +++ b/static/saclay/images/subcategories/ress_heberg_off.png diff --git a/static/saclay/images/subcategories/ress_heberg_on.png b/static/saclay/images/subcategories/ress_heberg_on.png Binary files differnew file mode 100644 index 0000000..b4f2ed2 --- /dev/null +++ b/static/saclay/images/subcategories/ress_heberg_on.png diff --git a/static/saclay/json/limites.json b/static/saclay/json/limites.json new file mode 100644 index 0000000..c4bd374 --- /dev/null +++ b/static/saclay/json/limites.json @@ -0,0 +1,11 @@ +{ +"type": "FeatureCollection", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + +"features": [ +{ "type": "Feature", "properties": { "id": 2 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1.415367733044637, 49.146755062646641 ], [ 1.910690386864486, 49.150093445860122 ], [ 1.903186849198962, 48.835273024038308 ], [ 1.904075446728196, 48.642725738777457 ], [ 1.902387807685004, 48.319876279125701 ], [ 1.406722596398787, 48.324208966009472 ], [ 1.415367733044637, 49.146755062646641 ] ] ] } }, +{ "type": "Feature", "properties": { "id": 3 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 2.332812437502604, 49.14879263981846 ], [ 2.825963733102833, 49.149887858037772 ], [ 2.868637641079677, 48.309477652615946 ], [ 2.327778583840803, 48.322815269690658 ], [ 2.308802961286472, 48.644265672631498 ], [ 2.3084639891017, 48.834849987186722 ], [ 2.332812437502604, 49.14879263981846 ] ] ] } }, +{ "type": "Feature", "properties": { "id": 4 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1.910690386864491, 49.150093445860115 ], [ 2.332812437502604, 49.14879263981846 ], [ 2.3084639891017, 48.834849987186722 ], [ 1.903186849198962, 48.835273024038308 ], [ 1.910690386864491, 49.150093445860115 ] ] ] } }, +{ "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 1.904075446728196, 48.642725738777457 ], [ 2.308802961286472, 48.644265672631498 ], [ 2.327778583840808, 48.322815269690643 ], [ 1.902387807684997, 48.31987627912568 ], [ 1.904075446728196, 48.642725738777457 ] ] ] } } +] +} diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html index 133050a..037d5a8 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -191,6 +191,8 @@ $(function(){ $('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} + $('#{{map_id}}').chimere('addJSON', "{{STATIC_URL}}saclay/json/limites.json"); + // init layer selection $(function() { {% for layer_name, js, def in map_layers %} diff --git a/templates/chimere/blocks/map_menu.html b/templates/chimere/blocks/map_menu.html new file mode 100644 index 0000000..38fb4a8 --- /dev/null +++ b/templates/chimere/blocks/map_menu.html @@ -0,0 +1,14 @@ +{% load i18n %} +<div id='chimere_map_menu'> + <ul> + {% if routing %} + <li id='map_menu_from' class='routing_item'>{% trans "From" context "routing" %}</li> + <li id='map_menu_step' class='routing_item'>{% trans "Add a step" context "routing" %}</li> + <li id='map_menu_to' class='routing_item'>{% trans "To" context "routing" %}</li> + <li id='map_menu_clear' class='routing_item'>{% trans "Clear the itinerary" context "routing" %}</li> + {% endif%} + <li id='map_menu_zoomin'>{% trans "Zoom in" %}</li> + <li id='map_menu_zoomout'>{% trans "Zoom out" %}</li> + <li id='map_menu_center'>{% trans "Center the map here" %}</li> + </ul> +</div> diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html index ff5b9fd..65e9600 100644 --- a/templates/chimere/detail.html +++ b/templates/chimere/detail.html @@ -26,6 +26,9 @@ {% for property in marker.getProperties %}{% if property.value %} <div class='properties' id='{{property.propertymodel.getAttrName}}'><strong>{{property.propertymodel.name}}</strong> : {% if 'http://' in property.value or 'https://' in property.value %}<a href='{{ property.value|sanitize:""}}'>{%endif%}{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}{% if 'http://' in property.value or 'https://' in property.value %}</a>{%endif%}</div> {%endif%}{% endfor %} + {% if marker.origin %} + <div class='origin'><label>Source :</label> {{marker.origin|safe}}</div> + {% endif %} </div> </div> <div id='detail_footer'> diff --git a/templates/chimere/main_map_simple.html b/templates/chimere/main_map_simple.html index 552d309..a14ea3f 100644 --- a/templates/chimere/main_map_simple.html +++ b/templates/chimere/main_map_simple.html @@ -1,24 +1,116 @@ -{% extends "chimere/main_map.html" %} -{% load i18n %} -{% block body_class %}class='simple'{% endblock %} -{% block body_id %}id='simple'{% endblock %} -{% block menu %}{# no menu in simple mode #}{% endblock %} +{% extends "chimere/base.html" %} +{% load i18n unlocalize_point chimere_tags %} +{% block extra_head %} +{% head_jquery %} +{% head_chimere %} +{% head_jme %} +{% head_form %} +<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script> + +<script type='text/javascript' language='javascript'> + <!-- + var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}"; + var edit_url = "{% url edit %}"; + var edit_event_url = "{% url edit-event %}"; + var edit_route_url = "{% url edit-route %}"; + // --> +</script> +<script src="{{ STATIC_URL }}saclay/js/interface.js" type="text/javascript"></script> +{{ block.super }} +{% endblock %} {% block message_edit %}{% endblock %} {% block sidebar %} <div class='sidebar-handler' id='sidebar-handler-hide'> </div> + <div id='action-panel'> + <ul id='map-actions' class='action'> + <li id='action-categories' class='state-active'> + <label>{% trans "Categories" %}</label> + </li>{% if itinerary_form %} + <li id='action-routing'> + <label>{% trans "Routing" %}</label> + </li>{% endif %} + </ul> + <ul id='edit-actions' class='action'> + <li id='action-edit-marker' class='state-active'> + <label>{% trans "Location" %}</label> + </li> + <li id='action-edit-route'> + <label>{% trans "Wander" %}</label> + </li> + <li id='action-edit-event'> + <label>{% trans "Event" %}</label> + </li> + </ul> + </div> <div id='panel'> - <a> - <h2>{% trans "Categories"%}</h2> - </a> - <form method='post' name='frm_categories' id='frm_categories'> - <div id='categories' name='categories'></div> - </form> + <div id='map-panel'> + <form action='.' method='post' name='frm_categories' id='frm_categories'> + <div id='categories'>{# dynamic content #} + </div> + </form> + {% routing %} + </div> + <div id='edit-panel'> + <div id='frm-edit-marker'>{# dynamic content #} + </div> + <div id='frm-edit-route'>{# dynamic content #} + </div> + <div id='frm-edit-event'>{# dynamic content #} + </div> + </div> + </div> + <div class='footer' id='footer-panel'> + {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "contact us" %}</a> | {% endif %} + <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "terms of service, credits" %}</a> </div> {% endblock %} {% block content %} - <script type='text/javascript'><!-- - var simple = true; - // --></script> + <div id='category_description'> + </div> + <script type='text/javascript'> + $(function(){ + $('#category_description').dialog({'autoOpen':false, width:630, + 'dialogClass':'no-titlebar'}); + }); + </script> + <div class='sidebar-handler' id='sidebar-handler-show'> + </div> + <div id='detail' class='ui-widget ui-corner-all'></div> + {% if not itinerary_form %}<div class='map_button'> + <a href='#' id='button-move-map' class='toggle-button toggle-button-active' onclick='toggleDrawOff();return false;'> + {% trans "Move on the map" %} + </a> + <a href='#' id='button-draw-map' class='toggle-button toggle-button-inactive' onclick='toggleDrawOn();return false;'> + {% trans "Draw" %} + </a> + </div>{% endif %} + <div id='permalink'></div> + {% if simple %} + {% display_welcome 0 %} + {%else%} + {% display_welcome news_visible %} + {% endif %} + {% display_news news_visible %} {{ block.super }} + <div id='map-shadow'></div> + <div id='default-message'></div> +<script type="text/javascript"> + <!-- + $("#main-map").show(); + // --> +</script> + {% map_menu %} + {% map 'main-map' %} + <div id='chimere_message'></div> + <script type='text/javascript'> + $(function(){$('#chimere_message').dialog({'autoOpen':false, + dialogClass:'no-titlebar-simple', position:'right bottom', + resizable: false});}); + </script> +{% endblock %} +{% block footer %} + <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> {% endblock %} diff --git a/xslt/guyancourt.xslt b/xslt/guyancourt.xslt new file mode 100644 index 0000000..235879b --- /dev/null +++ b/xslt/guyancourt.xslt @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8" ?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="xml" indent="yes"/> + <xsl:template match="/"> + <items> + <xsl:for-each select="/rss/channel/*/item"> + <item> + <name>Ville de Guyancourt : <xsl:value-of select="title"/></name> + <link><xsl:value-of select="link"/></link> + <description><xsl:value-of select="description"/></description> + <key>guyancourt-<xsl:value-of select="guid"/></key> + </item> + </xsl:for-each> + </items> + </xsl:template> +</xsl:stylesheet> + |